package org.gnomus.util;

public class misc {
    public static void checkAssertions() {
        try {
            assert false : "testing";
        } catch (AssertionError e) {
            return;
        }
        throw new Error("assertions: disabled");
    }

    public static Throwable unwind(Throwable t) {
        while (t.getCause() != null) {
            t = t.getCause();
        }
        return t;
    }

    public static void sleep(long ms) {
        try {
            Thread.sleep(ms);
        } catch (InterruptedException e) {
            // ignore
        }
    }
}
